<?php

namespace App\Controllers;

class writer extends BaseController {

    public function getIndex() {
        $poet = new \App\Models\poet();
        $records = $poet->findAll();
        $parser = \Config\Services::parser();
        return $parser->setData(['records' => $records])
                        ->render('poetslist');
    }

    public function getShowme($id) {
        $poet = new \App\Models\poet();
        $record = $poet->find($id);
        $parser = \Config\Services::parser();
        return $parser->setData($record)
                        ->render('onepoet');
    }

}
